<form action="/BoxSns/Home/Index/addTopic" id="addTopic" class="mgt20"  data-type="ajaxSubmit" method="post" >
	<volist name="params['form']"   id="vo">
		<input type="hidden" name="<{$key}>" value="<{$vo}>" />
	</volist>
	<input type="hidden" name="type" value="<{$params['type']}>" />
	<textarea style="width:100%" name="content" data-type="kindeditor" placeholder="一句话描述你的疑问" id="contentQuestion"></textarea>
	<button id="btnAsk" type="submit" class="btn mgt20 btn-block btn-success btn-large a_bnt">提问</button>
</form>
<div class="mgt20">
	<div class="sortlist mgt20">
		<h1>共 <{$count}> 个提问</h1>
	</div>
	<div id="answerList" class="after_div">
		<volist name="data" id="vo">
			<div class="media" id="media-id-<{$vo.id}>"> <a data-type="none" href="/User/index/user_id/<{$vo.user_id}>" target="_blank" class="small-avatar mgr10"> <img src="<{$vo.user.headimg}>" width="20" height="20"> </a> <a href="/User/index/user_id/<{$vo.user_id}>" data-type="none" target="_blank" class="f12 muted" ><{$vo.user.nickname}></a> <span class="muted pull-right mgl10 f12"><{$vo['time_tran']}></span>
				<div class="answer-content mgt10 clearfix" style=" padding-bottom:10px"> <span class="s_left"><{$vo.title}></span> <span class="s_right"><a data-type="modal" href="<{:U('Subject/topic_info',array('topic_id'=>$vo['id']))}>">回答(<{$vo.comment_count}>)</a> &nbsp;|&nbsp; <a data-type="modal"  href="<{:U('Subject/topic_info',array('topic_id'=>$vo['id']))}>">查看</a></span> </div>
			</div>
		</volist>
	</div>
	<include file="Public:pager" /> </div>
	
<script type="text/html" id="answerListItemHtml">
	<div class="media" id="media-id-{{items.id}}"> <a data-type="none" href="/User/index/user_id/{{items.user_id}}" target="_blank" class="small-avatar mgr10"> <img src="{{items.user.headimg}}" width="20" height="20"> </a> <a data-type="none" href="/User/index/user_id/{{items.user_id}}" target="_blank" class="f12 muted" >{{items.user.nickname}}</a> <span class="muted pull-right mgl10 f12">{{items.time_tran}}</span>
				<div class="answer-content mgt10 clearfix" style=" padding-bottom:10px"> <span class="s_left">{{#items.title}}</span> <span class="s_right"><a data-type="modal" href="/Subject/topic_info/topic_id/{{items.id}}">回答({{items.comment_count}})</a> &nbsp;|&nbsp; <a data-type="modal"  href="/Subject/topic_info/topic_id/{{items.id}}">查看</a></span> </div>
			</div>
</script>
<script type="text/javascript">
 	$("#addTopic").on("ajaxSubmitSuccess",function(e,content){
		 var data= JSON.parse(content);
		 if(data.error>0){
			 dialog(data.msg)
		}else{
			 var answerList=$(this).parent().find("#answerList");
				$("#contentQuestion").val("");
				$("#contentQuestion").trigger("kindeditorChange");
			 box_render(data.msg,$("#answerListItemHtml").html(),answerList,"prepend");
		}
		
	})
 </script>